﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Configuration;
using System.Data;
using SIPO.Library.DomainObject.Administration.Catalog;
using SIPO.Library.DataAccess.Administration.Catalog;
using SIPO.Web.Support;


namespace SIPO.Web.Forms.Transaction
{
    public partial class recInvoiceManualform : BasePage
    {
        protected override void OnLoad(EventArgs e)
        {
            if (!IsPostBack)
            {

                recTransactionTypeRepo recTransactionTypeDal = new recTransactionTypeRepo(ConfigurationManager.ConnectionStrings["SIPOConn"].ConnectionString);
                //populate dropdownlist transactionType
                List<recTransactionType> transTypes = recTransactionTypeDal.GetListIsBilling();

                ddlJenisTransaksi.Items.Clear();
                if (transTypes.Count > 0)
                {
                    transTypes.ForEach(delegate(recTransactionType transType)
                    {
                        ddlJenisTransaksi.Items.Add(new ListItem(transType.TransTypeCode + "-" + transType.TransTypeName, transType.TransTypeID.ToString()));
                    });
                }
                ddlJenisTransaksi.Items.Insert(0, new ListItem("-- pilih jenis transaksi --", string.Empty));

               

                  }
        }
    }
}